<?php
namespace ImiDemo\HttpDemo\MainServer\Model;

use Imi\Model\Model;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * RoleRule
 * @Entity
 * @Table(name="tb_role_rule", id={"role_id", "rule_id"})
 * @property int $roleId
 * @property int $ruleId
 */
class RoleRule extends Model
{
	/**
	 * role_id - 角色ID
	 * @Column(name="role_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=false)
	 * @var int
	 */
	protected $roleId;

	/**
	 * 获取 roleId - 角色ID
	 *
	 * @return int
	 */ 
	public function getRoleId()
	{
		return $this->roleId;
	}

	/**
	 * 赋值 roleId - 角色ID
	 * @param int $roleId role_id
	 * @return static
	 */ 
	public function setRoleId($roleId)
	{
		$this->roleId = $roleId;
		return $this;
	}

	/**
	 * rule_id - 权限规则ID
	 * @Column(name="rule_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=1, isAutoIncrement=false)
	 * @var int
	 */
	protected $ruleId;

	/**
	 * 获取 ruleId - 权限规则ID
	 *
	 * @return int
	 */ 
	public function getRuleId()
	{
		return $this->ruleId;
	}

	/**
	 * 赋值 ruleId - 权限规则ID
	 * @param int $ruleId rule_id
	 * @return static
	 */ 
	public function setRuleId($ruleId)
	{
		$this->ruleId = $ruleId;
		return $this;
	}

}